home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIRecyclingAllocator.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  3KB  |  107 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIRecyclingAllocator.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIRecyclingAllocator_h__
  6. #define __gen_nsIRecyclingAllocator_h__
  7.  
  8.  
  9. #ifndef __gen_nsIMemory_h__
  10. #include "nsIMemory.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIRecyclingAllocator */
  19. #define NS_IRECYCLINGALLOCATOR_IID_STR "d064a04c-9cee-4319-be31-64d565bccba9"
  20.  
  21. #define NS_IRECYCLINGALLOCATOR_IID \
  22.   {0xd064a04c, 0x9cee, 0x4319, \
  23.     { 0xbe, 0x31, 0x64, 0xd5, 0x65, 0xbc, 0xcb, 0xa9 }}
  24.  
  25. /**
  26.  *
  27.  * nsIRecyclingAllocator: A wrapper for the nsRecyclingAllocator
  28.  *
  29.  * Holds allocations and reuses them for subsequent allocs.
  30.  * Thread safe and uses a timer to release freelist.
  31.  *
  32.  * @status UNDER-DEVELOPMENT
  33.  */
  34. class NS_NO_VTABLE nsIRecyclingAllocator : public nsIMemory {
  35.  public: 
  36.  
  37.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IRECYCLINGALLOCATOR_IID)
  38.  
  39.   /* void init (in size_t nblocks, in size_t recycleAfter, in string id); */
  40.   NS_IMETHOD Init(size_t nblocks, size_t recycleAfter, const char *id) = 0;
  41.  
  42. };
  43.  
  44. /* Use this macro when declaring classes that implement this interface. */
  45. #define NS_DECL_NSIRECYCLINGALLOCATOR \
  46.   NS_IMETHOD Init(size_t nblocks, size_t recycleAfter, const char *id); 
  47.  
  48. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  49. #define NS_FORWARD_NSIRECYCLINGALLOCATOR(_to) \
  50.   NS_IMETHOD Init(size_t nblocks, size_t recycleAfter, const char *id) { return _to Init(nblocks, recycleAfter, id); } 
  51.  
  52. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  53. #define NS_FORWARD_SAFE_NSIRECYCLINGALLOCATOR(_to) \
  54.   NS_IMETHOD Init(size_t nblocks, size_t recycleAfter, const char *id) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(nblocks, recycleAfter, id); } 
  55.  
  56. #if 0
  57. /* Use the code below as a template for the implementation class for this interface. */
  58.  
  59. /* Header file */
  60. class nsRecyclingAllocator : public nsIRecyclingAllocator
  61. {
  62. public:
  63.   NS_DECL_ISUPPORTS
  64.   NS_DECL_NSIRECYCLINGALLOCATOR
  65.  
  66.   nsRecyclingAllocator();
  67.  
  68. private:
  69.   ~nsRecyclingAllocator();
  70.  
  71. protected:
  72.   /* additional members */
  73. };
  74.  
  75. /* Implementation file */
  76. NS_IMPL_ISUPPORTS1(nsRecyclingAllocator, nsIRecyclingAllocator)
  77.  
  78. nsRecyclingAllocator::nsRecyclingAllocator()
  79. {
  80.   /* member initializers and constructor code */
  81. }
  82.  
  83. nsRecyclingAllocator::~nsRecyclingAllocator()
  84. {
  85.   /* destructor code */
  86. }
  87.  
  88. /* void init (in size_t nblocks, in size_t recycleAfter, in string id); */
  89. NS_IMETHODIMP nsRecyclingAllocator::Init(size_t nblocks, size_t recycleAfter, const char *id)
  90. {
  91.     return NS_ERROR_NOT_IMPLEMENTED;
  92. }
  93.  
  94. /* End of implementation class template. */
  95. #endif
  96.  
  97. #define NS_RECYCLINGALLOCATOR_CID \
  98. { /* ac07ed4c-bf17-4976-a15c-d2194db3b1bf */ \
  99.     0xac07ed4c,                              \
  100.     0xbf17,                                  \
  101.     0x4976,                                  \
  102.     {0xa1, 0x5c, 0xd2, 0x19, 0x4d, 0xb3, 0xb1, 0xbf} }
  103. #define NS_RECYCLINGALLOCATOR_CLASSNAME "Recycling Allocator"
  104. #define NS_RECYCLINGALLOCATOR_CONTRACTID "@mozilla.org/recycling-allocator;1"
  105.  
  106. #endif /* __gen_nsIRecyclingAllocator_h__ */
  107.